<?php 

$shortname = THE_SHORTNAME;
$initial = THE_INITIAL;

global $wpdb;

$optsidebar = array(
	$shortname . "-sidebar" => "Sidebar", 
);
$optionsidebarval = get_option( $shortname . '_sidebar');
	if(is_array($optionsidebarval)){
		
		foreach($optionsidebarval as $ids => $val){
			$optsidebar[$ids] = $val;
		}
		
	}


/* Option */
$optonoff = array(
	'true' => 'On',
	'false' => 'Off'
);

$optslidertype = array(
	'flexslider' => 'Flexslider',
	'layerslider' => 'LayerSlider'
);

$optlayout = array(
	'' => 'Default',
	'left' => 'Left',
	'right' => 'Right'
);

$optbloglayout = array(
	'' => 'Default',
	'3col-masonry' => 'Masonry 3 Columns',
	'2col-masonry' => 'Masonry 2 Columns',
	'timeline' => 'Timeline'
);

$opttextalign = array(
	'left' => 'Left',
	'right' => 'Right'
);

$optslidertextalign = array(
	'top' => 'Top',
	'left' => 'Left',
	'right' => 'Right'
);

$optpcolumns = array(
	'' => 'Default',
	'classic-2' => 'Classic Two Columns',
	'classic-3' => 'Classic Three Columns',
	'classic-4' => 'Classic Four Columns',
	'masonry-0' => 'Masonry Free Columns',
	'masonry-3' => 'Masonry Three Columns',
	'masonry-4' => 'Masonry Four Columns',
	'grid-3'	=> 'Grid Three Columns',
	'grid-4'	=> 'Grid Four Columns'
);

$optpcontainer = array(
	'' => 'Default',
	'nvr-fullwidthwrap' => '100% Full-Width'
);

$optpitemtype = array(
	'' => 'Default',
	'square' => 'Square',
	'portrait' => 'Portrait',
	'landscape' => 'Landscape'
);

$optarrange = array(
	'ASC' => 'Ascending',
	'DESC' => 'Descending'
);

$optbgrepeat = array(
	'' => 'Default',
	'repeat' => 'repeat',
	'no-repeat' => 'no-repeat',
	'repeat-x' => 'repeat-x',
	'repeat-y' => 'repeat-y'
);

$optbgattch = array(
	'' => 'Default',
	'scroll' => 'scroll',
	'fixed' => 'fixed'
);

$imagepath =  get_template_directory_uri() . '/images/backendimage/';
$optlayoutimg = array(
	'default' => $imagepath.'mb-default.png',
	'one-col' => $imagepath.'mb-1c.png',
	'two-col-left' => $imagepath.'mb-2cl.png',
	'two-col-right' => $imagepath.'mb-2cr.png'
);
// Create meta box slider
global $nvr_meta_boxes;
$nvr_meta_boxes = array();

$nvr_meta_boxes[] = array(
	'id' => 'post-option-meta-box',
	'title' => __('Post Options',THE_LANG),
	'page' => 'post',
	'showbox' => 'meta_option_show_box',
	'context' => 'normal',
	'priority' => 'high',
	'fields' => array(
		array(
			'name' => __('Layout',THE_LANG),
			'desc' => '<em>'.__('Select the layout you want on this specific post/page. Overrides default site layout.',THE_LANG).'</em>',
			'options' => $optlayoutimg,
			'id' => '_'.$initial.'_layout',
			'type' => 'selectimage',
			'std' => ''
		),
		array(
			'name' => __('External URL',THE_LANG),
			'desc' => '<em>'.__('Input your external link in here. if you use "Link" format.',THE_LANG).'</em>',
			'id' => '_'.$initial.'_external_url',
			'type' => 'text',
			'std' => ''
		),
		array(
			'name' => __('Audio File URL',THE_LANG),
			'desc' => '<em>'.__('Input your audio file URL in here. ',THE_LANG).'</em>',
			'id' => '_'.$initial.'_audio_url',
			'type' => 'textarea',
			'std' => ''
		),
		array(
			'name' => __('Video File URL / Video Link',THE_LANG),
			'desc' => '<em>'.__('Input your video file URL or video link like youtube or vimeo in here. ',THE_LANG).'</em>',
			'id' => '_'.$initial.'_video_url',
			'type' => 'textarea',
			'std' => ''
		)
	)
);


$nvr_meta_boxes[] = array(
	'id' => 'page-option-meta-box',
	'title' => __('Page Options',THE_LANG),
	'page' => 'page',
	'showbox' => 'meta_option_show_box',
	'context' => 'normal',
	'priority' => 'high',
	'fields' => array(
		array(
			'name' => __('Layout',THE_LANG),
			'desc' => '<em>'.__('Select the layout you want on this specific post/page. Overrides default site layout.',THE_LANG).'</em>',
			'options' => $optlayoutimg,
			'id' => '_'.$initial.'_layout',
			'type' => 'selectimage',
			'std' => ''
		),
		array(
			'name' => __('Background Color Maincontent',THE_LANG),
			'desc' => '<em>'.__('Input the hexcolor in this textbox if you want to change the background color of your content.',THE_LANG).'</em>',
			'id' => 'bg_color_maincontent',
			'type' => 'text',
			'std' => ''
		),
		array(
			'name' => __('Page Description',THE_LANG),
			'desc' => '<em>'.__('Input your own page description here.',THE_LANG).'</em>',
			'id' => '_'.$initial.'_pagedesc',
			'type' => 'text',
			'std' => ''
		)
	)
);

$nvr_meta_boxes[] = array(
	'id' => 'page-sidebar-meta-box',
	'title' => __('Sidebar Option',THE_LANG),
	'page' => 'page',
	'showbox' => 'meta_option_show_box',
	'context' => 'side',
	'priority' => 'high',
	'fields' => array(
		array(
			'name' => __('Registered Sidebar',THE_LANG),
			'desc' => '<em>'.__('Please choose the sidebar for this page',THE_LANG).'</em>',
			'options' => $optsidebar,
			'id' => '_'.$initial.'_sidebar',
			'type' => 'select',
			'std' => ''
		)
	)
);

$nvr_meta_boxes[] = array(
	'id' => 'page-blog-option-meta-box',
	'title' => __('Page Blog Options',THE_LANG),
	'page' => 'page',
	'showbox' => 'meta_option_show_box',
	'context' => 'normal',
	'priority' => 'high',
	'fields' => array(
		array(
			'name' => __('Blog Categories',THE_LANG),
			'desc' => '<em>'.__('You need to tick the blog categories to make the template blog works.',THE_LANG).'</em>',
			'id' => 'blog_category',
			'type' => 'checkbox-blog-categories',
			'std' => ''
		),
		array(
			'name' => __('Blog Type',THE_LANG),
			'desc' => '<em>'.__('Choose the type of the blog that you want to show.',THE_LANG).'</em>',
			'id' => 'blog_layout',
			'type' => 'select',
			'options' => $optbloglayout,
			'std' => ''
		),
		array(
			'name' => __('Use Infinite Scrolls?',THE_LANG),
			'desc' => '<em>'.__('Choose \'On\' if you want to use infinite scrolls.',THE_LANG).'</em>',
			'id' => 'blog_infscrolls',
			'type' => 'select',
			'options' => $optonoff,
			'std' => 'false'
		)
	)
);
?>